import { Provider, Injectable } from '@opensumi/di';
import { BrowserModule } from '@opensumi/ide-core-browser';
import { LowcodeContribution } from './lowcode.contribution';
import { LowcodeService } from './lowcode.service';
import { ILowcodeConnectionServerPath, ILowcodeService } from '../common';

@Injectable()
export class LowcodeModule extends BrowserModule {
  providers: Provider[] = [
    {
      token: ILowcodeService,
      useClass: LowcodeService,
    },
    LowcodeContribution,
  ];

  backServices = [
    {
      servicePath: ILowcodeConnectionServerPath,
      clientToken: ILowcodeService,
    },
  ];
}
